#include "alphabeta.h"
#include "searchlimit.h"
#include "Node.h"
#include "movegen.h"

void searchLoop(oNode root, SearchLimit limits) {

	GetLegalMoves(root.position,root.moves);
	//root.moves 

	int depth = 0;

	while(++depth < limits.depthLimit){

		// 1. search at 'depth' depth ( [depth-1 .. 1] are supposed to be done already)
		searchDepth(root, depth);

		// 2. sort root moves by score
		root.moves.sort();

	}

}

void searchDepth(oNode root, int depth){



}